import qrcode
from PIL import Image


def generate_qr():
    qr = qrcode.QRCode(
        version=3,
        error_correction=qrcode.constants.ERROR_CORRECT_L,
        box_size=10,
        border=4,
    )
    url = 'www.bing.com'
    qr.add_data(url)
    qr.make(fit=True)

    img = qr.make_image(fill_color="black", back_color="white")
    img.save('./test2.jpg')


def overlap_two_images(img1, img2):
    im1 = Image.open(img1)
    im2 = Image.open(img2)
    im1.paste(im2, (378, 1128))
    im1.show()


def main():
    overlap_two_images('./ad_01.jpg', 'test2.jpg')


if __name__ == '__main__':
    main()
